#ifndef INCLUDED_ISOMETRICMAP_H
#define INCLUDED_ISOMETRICMAP_H
#include <SGE.h>
#include <list>
#include <iterator>
using namespace SGE;
class IsometricMap
{
public:
	IsometricMap();
	~IsometricMap();
	void Load(const char* pLevel, const char* pTexturePack);
	void Unload();
	void Update(float deltaTime);
	void Render();
	int getWidth2D()	const	{return mColumns*mTileSizeW;}
	int getHeight2D()	const	{return mRows*mTileSizeH;}
	SVector2 GetScreenCoordinate(SVector2 coor) const;
	SVector2 GetScreenCoordinateChar() const;
	SVector2 GetScreenPositionPixelTile(SVector2 coor) const;
	SVector2 GetScreenPositionPixelChar(SVector2 coor) const;
	SVector2 GetOffset()	const	{return mOffset;};
	int GetIndex2D(int x, int y) const;
	int GetRow() const {return mRows;};
private:
	bool LoadLevel(const char* pLevel);
	bool LoadTexturePack(const char* pTexturePack);
	

	SVector2 mOffset;
	SGE_Sprite *mpSprites;
	int *mpTiles;
	int mNumSprites,
		mheight,
		mTileSizeH,
		mTileSizeW,
		mColumns,
		mRows;
};
#endif